package com.wuzheng.wisgo.sanitation.cloud.service.job;

import com.wuzheng.wisgo.sanitation.cloud.model.job.param.JobRoadDetailParam;
import com.wuzheng.wisgo.sanitation.cloud.model.job.pojo.JobRoadDTO;
import com.wuzheng.wisgo.sanitation.cloud.model.job.param.JobRoadListParam;
import com.wuzheng.wisgo.sanitation.cloud.model.road.RoadStateDTO;
import com.wuzheng.wisgo.sanitation.cloud.repository.entity.job.JobRoad;
import com.wuzheng.wisgo.sanitation.cloud.repository.entity.person.User;
import com.wuzheng.wisgo.sanitation.framework.base.service.BaseService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author：hoipang
 * @date：Created in 2019-12-10
 * @description：作业道路服务类
 * @modified By：
 * @version: 1.0
 */
public interface JobRoadService extends BaseService<JobRoad> {

    /**
     * 查询作业道路特定信息列表(支持分页)
     *
     * @param jobRoadListParam
     * @return
     */
    List<JobRoadDTO> listJobRoadDTOs(User user, JobRoadListParam jobRoadListParam);

    /**
     * 查询地图上作业道路的状态
     * @return
     */
    List<RoadStateDTO> listRoadStateDTOs();

    /**
     * 批量删除作业道路
     *
     * @param list
     */
    void removeJobRoads(List<String> list);

    /**
     * 查询作业道路特定信息
     *
     * @param id
     * @return
     */
    JobRoadDTO selectJobRoadDTO(User user, String id);

    /**
     * 增加或更新作业道路
     *
     * @param jobRoadDetailParam
     * @return
     */
    @Transactional
    JobRoadDTO insertOrUpdate(User user, JobRoadDetailParam jobRoadDetailParam);
}
